package com.jh.user.pojo.freeQuick;

import cn.jh.common.pay.utils.InEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.MoreObjects;
import org.jetbrains.annotations.NotNull;

import java.util.List;


/**
 * @author Fuchun
 * @since 1.0
 */
public class InBindCard extends InEntity {

    private static final long serialVersionUID = 1L;

    // 流水号
    private String outSerialNo;

    // 产品编码
    private String productCode;

    // 银行卡号
    private String cardNo;

    // 银行卡类型
    private String cardType;

    // cvn安全码
    private String cardCvn2;

    // 银行卡有效期
    private String cardExpired;

    // 银行编码
    private String bankNo;

    // 开户名
    private String accName;

    // 身份证号码
    private String idNo;

    // 手机号码
    private String mobileNo;

    // 服务回调地址
    private String notifyUrl;

    public InBindCard() {
        super();
    }

    @Override
    protected void applySign(@NotNull List<String> parts) {
        parts.add(getOutSerialNo());
        parts.add(getProductCode());
        parts.add(getCardNo());
        parts.add(getCardType());
        parts.add(getCardCvn2());
        parts.add(getCardExpired());
        parts.add(getBankNo());
        parts.add(getAccName());
        parts.add(getIdNo());
        parts.add(getMobileNo());
        parts.add(getNotifyUrl());
    }

    @JsonProperty("out_serial_no")
    public String getOutSerialNo() {
        return outSerialNo;
    }

    public void setOutSerialNo(String outSerialNo) {
        this.outSerialNo = outSerialNo;
    }

    @JsonProperty("product_code")
    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    @JsonProperty("card_no")
    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    @JsonProperty("card_type")
    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    @JsonProperty("card_cvn2")
    public String getCardCvn2() {
        return cardCvn2;
    }

    public void setCardCvn2(String cardCvn2) {
        this.cardCvn2 = cardCvn2;
    }

    @JsonProperty("card_expired")
    public String getCardExpired() {
        return cardExpired;
    }

    public void setCardExpired(String cardExpired) {
        this.cardExpired = cardExpired;
    }

    @JsonProperty("bank_no")
    public String getBankNo() {
        return bankNo;
    }

    public void setBankNo(String bankNo) {
        this.bankNo = bankNo;
    }

    @JsonProperty("acc_name")
    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    @JsonProperty("id_no")
    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    @JsonProperty("mobile_no")
    public String getMobileNo() {
        return mobileNo;
    }

    public void setMobileNo(String mobileNo) {
        this.mobileNo = mobileNo;
    }

    @JsonProperty("notify_url")
    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    @Override
    protected void applyToString(MoreObjects.ToStringHelper tsh) {
        tsh.add("outSerialNo", outSerialNo)
                .add("cardNo", cardNo)
                .add("productCode", productCode)
                .add("cardType", cardType)
                .add("cardCvn2", cardCvn2)
                .add("cardExpired", cardExpired)
                .add("bankNo", bankNo)
                .add("accName", accName)
                .add("idNo", idNo)
                .add("mobileNo", mobileNo)
                .add("notifyUrl", notifyUrl);
    }
}
